define(["require",'config/appregister',"jquery"],function(require,app){
    app.controller('helpListCtrl',function($scope,$state,$stateParams){
		$scope.helpList = [{
			name:"个人账户",
			helpId:0,
			list:[{
				name:"1、个人如何在工程界注册与登录？",
				helpDetailId:0
			},{
				name:"2、个人如何找回密码？",
				helpDetailId:1
			},{
				name:"3、如何增加密码安全性？",
				helpDetailId:2
			},{
				name:"4、如何修改密码和个人信息？",
				helpDetailId:3
			},{
				name:"5、个人会员和企业会员的功能区别？",
				helpDetailId:4
			}]
		},{
			name:"企业账户",
			helpId:1,
			list:[{
				name:"1、企业如何在工程界注册与登录？",
				helpDetailId:0
			},{
				name:"2、企业如何找回密码？",
				helpDetailId:1
			},{
				name:"3、注册成为企业用户，我可以做什么？",
				helpDetailId:2
			},{
				name:"4、如何修改企业基本信息",
				helpDetailId:3
			}]
		},{
			name:"会员体系及积分规则",
			helpId:2,
			list:[{
				name:"1、会员身份",
				helpDetailId:0
			},{
				name:"2、会员权限",
				helpDetailId:1
			},{
				name:"3、积分获取",
				helpDetailId:2
			},{
				name:"4、积分消耗",
				helpDetailId:3
			}]
		},{
			name:"资料下载",
			helpId:3,
			list:[{
				name:"1、下载的资料有几种格式，如何打开？",
				helpDetailId:0
			},{
				name:"2、下载资料的内容有问题怎么办？",
				helpDetailId:1
			}]
		},{
			name:"资料上传",
			helpId:4,
			list:[{
				name:"1、如何上传资料？",
				helpDetailId:0
			},{
				name:"2、工程界发布内容规章制度？",
				helpDetailId:1
			},{
				name:"3、工程界原创/授权声明用户规范",
				helpDetailId:2
			}]
		}]
		$scope.help = $scope.helpList[$stateParams.helpId]
		
		//跳转帮助中心
		$scope.goHelpCenter = function(){
			$state.go("footerCtrl.helpCtrl")
		}
		//跳转问题详情
		$scope.goHelpDetail = function(i,j){
			$state.go("footerCtrl.helpDetailCtrl",{"helpId":i,"helpDetailId":j},{reload:true})
		}
    })
});